<template>
  <el-form ref="form" :model="form" label-width="80px" style="width:50%">
    <el-form-item label="企业编号">
      <el-input v-model="form.id" :disabled="true"></el-input>
    </el-form-item>
    <el-form-item label="企业名称">
      <el-input v-model="form.name" :disabled="true"></el-input>
    </el-form-item>
    <el-form-item label="证件类型">
      <el-select v-model="form.type" placeholder="请选择证件类型" :disabled="true">
        <el-option label="统一社会信用代码" value="shanghai"></el-option>
        <el-option label="组织机构代码" value="beijing"></el-option>
        <el-option label="其他证件类型" value="b"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="成立日期">
      <el-date-picker type="date" placeholder="选择日期" v-model="form.date" style="width: 100%;" :disabled="true">
      </el-date-picker>
    </el-form-item>
    <el-form-item label="证件号码">
      <el-input v-model="form.num" :disabled="true"></el-input>
    </el-form-item>
    <el-form-item label="注册资本">
      <el-input v-model="form.capital" :disabled="true"></el-input>
    </el-form-item>
    <el-form-item label="详细地址">
      <el-input v-model="form.address" :disabled="true"></el-input>
    </el-form-item>
    <el-form-item label="职工人数">
      <el-input v-model="form.peonum" :disabled="true"></el-input>
    </el-form-item>
    <el-button type="primary" class="btn2" @click="down()">高管信息</el-button>
    <el-button type="primary" class="btn2" @click="down2()">返回</el-button>
  </el-form>
</template>

<script>
  export default {
    data() {
      return {
        form: {
          id: '',
          name: '',
          type: '',
          date: '',
          num: '',
          capital: '',
          address: '',
          peonum: ''
        }
      }
    },
    created() {
      this.form.id = this.$route.query.id
      this.form.name = this.$route.query.name
      this.form.type = this.$route.query.type
      this.form.date = this.$route.query.date
      this.form.num = this.$route.query.num
      this.form.capital = this.$route.query.capital
      this.form.address = this.$route.query.address
      this.form.peonum = this.$route.query.peonum
    },
    methods: {
      down2() {
        this.$router.push({ path: '/about' })
      },
      down() {
        this.$router.push({ path: '/workes', query: { enterpriseId: this.form.id } })
      },
      onSubmit() {
        console.log('submit!');
      }
    }
  }
</script>

<style scoped>
  .btn2 {
    margin-left: 20px;
  }
</style>